package de.lgohlke.serializer;

/**
 * <p>ISerializer interface.</p>
 *
 * @author lars
 * @version $Id: $
 */
public interface ISerializer<T>
{
  /**
   * <p>serialize.</p>
   *
   * @param data a T object.
   * @param <T> a T object.
   * @return an array of byte.
   */
  byte[] serialize(final T data);

  /**
   * <p>deserialize.</p>
   *
   * @param data an array of byte.
   * @return a T object.
   */
  T deserialize(final byte[] data);
}
